package com.baizhi;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
@TableName("file")
public class FileImg {
    @TableId(type = IdType.AUTO)
    private int id;
    private String oldname;
    private String newname;
    @JSONField(format="yyyy年MM月dd日")
    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date uploadtime;
    private String descript;

    @Override
    public String toString() {
        return "File{" +
                "id=" + id +
                ", oldname='" + oldname + '\'' +
                ", newname='" + newname + '\'' +
                ", uploadtime=" + uploadtime +
                ", descript='" + descript + '\'' +
                '}';
    }

    public FileImg() {
    }

    public FileImg(int id, String oldname, String newname, Date uploadtime, String descript) {
        this.id = id;
        this.oldname = oldname;
        this.newname = newname;
        this.uploadtime = uploadtime;
        this.descript = descript;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOldname() {
        return oldname;
    }

    public void setOldname(String oldname) {
        this.oldname = oldname;
    }

    public String getNewname() {
        return newname;
    }

    public void setNewname(String newname) {
        this.newname = newname;
    }

    public Date getUploadtime() {
        return uploadtime;
    }

    public void setUploadtime(Date uploadtime) {
        this.uploadtime = uploadtime;
    }

    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }
}
